The Sensex ended higher by 138 points at 19,367 and the 50-share Nifty advanced 43 points to close at 5,742.
Tata Motors was the top gainer among the Sensex stocks.
Vegetables and fruits have weights of 1.74 per cent and 2.11 per cent, respectively, in the wholesale price index.
The rate of price rise of food items was over 15 per cent during the same week last year.
The rise has been mainly on account of increase in prices of fruits, vegetables, imported edible oils, tea, sea fish, cement and iron and steel and spices, though the index for fuel items declined during the week.
In August, wholesale prices rose 3.74 per cent year-on-year.
CARE Ratings, in a report, said it foresees an increase in the retail prices of petrol and diesel in the coming few days, depending on how the oil markets react in the reduction in supply from the cartel.
Onion prices, however, continued to rule high with 79.78 per cent increase in September.
The government regulates prices of all other medicines.
Wholesale prices, India's main inflation measure, had risen 6.1 per cent in August.
Although the WPI-based inflation has been in the negative for two consecutive weeks, the Consumer Price Index, which measures movement in the prices that consumers pay, reported double-digit increase in May.
Food prices fell for the second consecutive week as food inflation remained in the negative zone at (-)2.90 per cent for the week ended December 31, 2011.
In spite of Governor Raghuram Rajan's repeated concerns about inflation, many think there may still be a loosening of stance.
Over 300 new items such as mobile phones and digital cameras would figure in the new wholesale price index that would give a better picture of the price situation. And close to 30 items would be knocked off from the new inflation series expected to be out by December.
The central bank is struggling to do so, after unleashing a panicky expansionary policy after the Lehman crisis.
Food inflation, as measured by the Wholesale Price Index, stood at 6.6 per cent in the previous week.
The wholesale price index inflation is projected at 6.4 per cent for 2017-18.
The rate of price rise of food items stood at 12.68 per cent in the corresponding week of the previous year.
The WPI inflation for September rose to 7.81 per cent, from 7.55 per cent in August.
Finance Minister Pranab Mukherjee termed the rise in food inflation as an area of 'grave concern'.
Overall inflation, as measured on the basis of the Wholesale Price Index, has been revised to 9.04 per cent for March from the original projection of 8.98 per cent.
The annual rate of inflation based on monthly wholesale price index (WPI) was 1.22 per cent in December as compared to 1.55 per cent in the previous month. It was 2.76 per cent in December 2019. The decline last month was mainly due to lower increase in food prices, data released by the Ministry of Commerce and Industry showed on Thursday. The food inflation for December dropped to 0.92 per cent as compared to 4.27 per cent in the previous month.
Trading in the equity market this week will be highly influenced by a host of important triggers, with quarterly earnings from IT majors TCS, Wipro, and domestic inflation and IIP data taking the centre stage in dictating the movement in equities, analysts said. Besides, global factors and trading activity of foreign investors will also drive markets. "We are approaching the first quarter earnings season, with HCL Tech, TCS and Wipro set to report their earnings this week.
Declining inflation may present a case for further monetary policy easing.
In February last year, it was 9.54 per cent.
As per commerce and industry ministry data, food inflation fell to 4.91 per cent in March from 7.79 per cent in the previous month.
Wholesale Price Index-based inflation declined to 6.62 per cent in January, however, retail inflation remained in double digits at 10.79 per cent during the month.
Food inflation, as measured by the Wholesale Price Index, was on a declining trajectory for the previous three weeks.
A sharp rise in prices of fruits, vegetables and other primary items, notably poultry chicken, and costlier manufactured products pushed up inflation by 0.10 per cent to 5.94 per cent for the week ended February 21.
Overall, vegetables were 47.06 per cent cheaper during the week under review, from the same period last year.
Food inflation remained in the negative zone for the third straight week, at (-)0.42 per cent for the week ended January 7, mainly due to fall in prices of onion and vegetables.
Food prices for consumers also eased to an annual 11.06 percent in August from 11.24 per cent in July.
Debt returns are always negative for investors in India, unless they are willing to take huge risk
Inflation may touch the six per cent-mark by the end of this fiscal due to surging food prices and decline in agricultural output, research firm Dun & Bradstreet said.
According to official data released on Thursday, onions grew cheaper by 59.04 per cent year-on-year during the week under review, while potato prices were down by 33.76 per cent.
With fuel being the main input cost for the transport sector, rise in cost of operations is a given. The sector is unsure on the extent of being able to pass this on through rentals or to absorb it with higher volumes.
Inflation in food articles, which have a 14.3 per cent share in the WPI basket, however witnessed an increase as onion prices shot up during the month.
Food inflation, as measured by the Wholesale Price Index, stood at 11.81 per cent in the previous week ended October 29.